package com.xiaobai.easyexcel;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;

import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 基础数据类
 *
 **/
@Data
public class DynamicHeadData {
    @ExcelProperty("字符串标题")
    @ColumnWidth(20)
    private String string;
    @ExcelProperty("日期标题")
    @ColumnWidth(20)
    private Date date;
    @ExcelProperty("数字标题")
    @ColumnWidth(20)
    private Double doubleData;
    /**
     * 忽略这个字段
     */
    @ExcelIgnore
    private String ignore;

    @ExcelProperty({"子数据", "第一列${firstColumn}"})
    @ColumnWidth(30)
    private String childrenString;

    @ExcelProperty({"子数据", "第二列${secondColumn}"})
    @ColumnWidth(30)
    private Date childrenDate;

    @ExcelProperty({"子数据", "第三列${thirdColumn}"})
    @ColumnWidth(30)
    private File imageData;

    @ExcelProperty({"子数据", "第四列${fourthColumn}"})
    @ColumnWidth(30)
    private String stringData;
}
